<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => '游离氧吧',
    'theme' => 'blue',
    'language'=> 'zh-cn',
// preloading 'log' component
    'preload' => array('log'),
// autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.vendors.*',
        'application.modules.rights.*',
        'application.modules.rights.components.*',
),
    'modules' => array(
// uncomment the following to enable the Gii tool

        'gii' => array(
            'class' => 'system.gii.GiiModule',
            'password' => '840527',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
            'ipFilters'=>array('127.0.0.1',"*"),
),
        'manager' => array(
),
		'service'=>array(
),
        'rights' => array(
            'install'=>true,
),
),
// application components
    'components' => array(
        'user' => array(
// enable cookie-based authentication
            'class'=>'RWebUser',
            'allowAutoLogin' => true,
),
        'widgetFactory'=>array(
            'class'=>'CWidgetFactory',
),

// uncomment the following to enable URLs in path-format
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'urlSuffix' => '.htm',
            'rules'=>array(
              '<controller:\w+>/<id:\d+>'=>'<controller>/view',
),
),
/*
 'urlManager'=>array(
 'urlFormat'=>'path',
 'rules'=>array(
 '<controller:\w+>/<id:\d+>'=>'<controller>/view',
 '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
 '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
 ),
 ),
 */

// uncomment the following to use a MySQL database
/*
 'db'=>array(
 'connectionString' => 'mysql:host=localhost;dbname=testdrive',
 'emulatePrepare' => true,
 'username' => 'root',
 'password' => '',
 'charset' => 'utf8',
 ),
 */
        'errorHandler' => array(
// use 'site/error' action to display errors
            'errorAction' => 'site/error',
),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
/*
 array(
 'class' => 'CFileLogRoute',
 'levels' => 'error',
 //'categories'=>'system.db.*',
 ),
 */
/*
 array(
 'class' => 'CWebLogRoute',
 'levels' => 'profile,trace',
 //'categories'=>'system.db.*',
 ),
 */

// uncomment the following to show log messages on web pages
/*
 array(
 'class'=>'CWebLogRoute',
 ),
 */
),
),

        'cache' => array(
            'class' => 'system.caching.CFileCache',
            'keyPrefix' => 'oliyo',
            'cachePath' => 'protected/cache',
            'cacheFileSuffix' => 'oliyo',
		),
/*
		'cache'=>array(
			'class'=>'CMemCache',
			'Servers'=>array(
				array(
					'host'=>'192.168.1.180',
					'port'=>11211,
				),
			),
		),
*/
        'db' => array(
            'class' => 'system.db.CDbConnection',
            'connectionString' => 'sqlite:protected/data/center.sqlite',
            'schemaCachingDuration' => 3600,
            'enableParamLogging'=>true,
),
        'authManager'=>array(
            'class'=>'RDbAuthManager',
//'connectionId'=>'db',
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
    'params' => array(
// this is used in contact page
        'adminEmail' => 'service@oliyo.com',
        'astors' => array(
            "Aries" => array("白羊", "灰常冲动的星座，做事不经大脑"),
            "Taurus" => array("金牛", "小气鬼鬼一个，灰常死板"),
            "Gemini" => array("双子", "头脑灵活，做事不靠谱，很善变，乱搞暧昧关系"),
            "Cancer" => array("巨蟹", "灰常爱家，而且是相当爱家，灰常温柔"),
            "Leo" => array("狮子", "死要面子活受罪"),
            "Virgo" => array("处女", "龟毛，理性，学习能力强，小心眼"),
            "Libra" => array("天秤", "死臭美，乱花钱，花心萝卜，乱搞暧昧关系"),
            "Scorpio" => array("天蝎", "复仇专家，超级爱记仇，不过很性感"),
            "Sagittarius" => array("射手", "做事没脑子，含蓄的说：很直率，很哥们义气"),
            "Capricorn" => array("摩羯", "做事很认真，不过很死板，不达目的不罢休"),
            "Pisces" => array("双鱼", "死浪漫死浪漫的，不是地球人，面对现实具足无措"),
            "Aquarius" => array("水瓶", "超级理性，花心萝卜，外星人"),
),
        'astor_name_id'=>array(
            "1" => array('Aries','白羊'),
            "2" => array('Taurus','金牛'),
            "3" => array('Gemini','双子'),
            "4" => array('Cancer','巨蟹'),
            "5" => array('Leo','狮子'),
            "6" => array('Virgo','处女'),
            "7" => array('Libra','天秤'),
            "8" => array('Scorpio','天蝎'),
            "9" => array('Sagittarius','射手'),
            "10" => array('Capricorn','摩羯'),
            "11" => array('Aquarius','水瓶'),
            "12" => array('Pisces','双鱼'),
),
        "siteTitles"=>"最个性的星座信息网，准确配对，心情故事，星座心情，尽在游离氧吧-www.oliyo.com",
        "Google_Code_Authentication_Key" => 'Tu57fjW9m6xzOvkP',
        'Google_Code_Authentication_Field' => 'Google-Code-Project-Hosting-Hook-Hmac',
        'SITE_CACHE_ID'=>array(
        	'TODAY_ASTOR_CACHE'=>array(
        		'id'=>'today_astor_forecast_cache',
        		'time'=>300,
),
),
),
);
